package com.sunwayhorizo.health.business.dto.patad.encounter;

import java.io.*;
import java.util.*;
import javax.validation.*;
import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import com.sunwayhorizo.health.business.dto.*;
import com.sunwayhorizo.health.business.dto.clinic.emr.emrmanager.*;
import com.sunwayhorizo.health.business.dto.clinic.mqa.*;
import com.sunwayhorizo.health.business.dto.patad.empi.*;
import com.sunwayhorizo.health.business.dto.registries.*;
import com.sunwayhorizo.health.common.validateGroups.*;

/**
 * @ClassName PatientEncounterDTO <br>
 * @PackageName com.sunwayhorizo.health.business.dto.patad.encounter<br>
 * @Description 患者就诊DTO<br>
 * @Author jinzw <br>
 * @Date 2011-01-2 <br>
 * @Version 1.0 <br>
 * @ModifiedDesc <br>
 * @ModifiedDate <br>
 * @ModifiedBy <br>
 * @Email jinzw@sunwaysoft.com.cn <br>
 * @Copyright 2010-2020 horizo All Rights Reserved. <br>
 */
public class PatientEncounterDTO implements Serializable
{
   
    /**
	 * 
	 */
    private static final long serialVersionUID = 3961183841662780530L;

    /**
     * 住院号
     */

    private String hospitalizationNO;

    /**
     * 患者就诊号
     */
    @NotEmpty(message = "就诊号不能为空！", groups = { NewReceiving.class, NewDeptTransfer.class ,NewOutHospital.class,NewReceivingAdmit.class})
    private String encounterID;

    /**
     * 就诊类型 (挂号：CLINIC 转科：PATIENTTRANSFER 入院：HOSPITALIZED 入科：INDEPARTMENT
     * 门诊急诊：OUTPATIENTADMIT 住院接诊：INPATIENTADMIT)
     */
    @NotNull
    private String encounterType;

    /**
     * 就诊卡类型数据字典DTO
     */
    private DictionaryDTO medicalCardTypeDic = new DictionaryDTO();

    /**
     * 就诊卡号
     */
    @Size(max = 10, min = 10)
    private String medicalCardId;

    /**
     * 患者基本信息
     */
    @Valid
    private PatientBaseInfoDTO patientBaseInfoDTO = new PatientBaseInfoDTO();

    /**
     * 身份证证件类型数据字典DTO
     */
    @Valid
    private DictionaryDTO cardTypeDic = new DictionaryDTO();

    /**
     * 身份证号
     */

    @NotEmpty(groups = ValidateCardNo.class)
    // @Size(max = 18, min = 15,groups=ValidateCardNo.class)
    private String cardId;

    /**
     * 医保类型数据字典DTO
     */
    @Valid
    private DictionaryDTO insuranceTypeDic = new DictionaryDTO();

    /**
     * 医保号
     */

    @NotEmpty(groups = ValidateCardNo.class)
    private String insuranceId;

    /**
     * 患者号表信息集合
     */
    public List<VisitsDTO> listVisitInfo = new ArrayList<VisitsDTO>();

    /**
     * 费别
     */
    private DictionaryDTO chargeTypeDic = new DictionaryDTO();

    /**
     * 支付方式DTO
     */
    public PayWayDTO payWay = new PayWayDTO();

    /**
     * 入院基本信息
     */
    @Valid
    public InHospitalDTO inHospitalDTO = new InHospitalDTO();

    /**
     * 转科基本信息
     */
    @Valid
    public TransferDTO transferDTO = new TransferDTO();

    /**
     * 操作员信息记录
     */
    @Valid
    public LoginBaseInfoDTO loginBaseInfo = new LoginBaseInfoDTO();

    /**
     * 入科，接诊基本信息
     */
    @Valid
    public InDepartmentDTO inDepartment = new InDepartmentDTO();

    /**
     * 门诊诊断
     */
    private DictionaryDTO outpat_diagose = new DictionaryDTO();

    /**
     * 出院信息
     */
    private DischargedDTO dischargedDTO = new DischargedDTO();

    /**
     * 病例信息
     */
    private EmrManagerDTO emrControllerDTO = new EmrManagerDTO();

    /**
     * 单位DTO
     */
    private OrganizationDTO organizationDTO = new OrganizationDTO();
    
    /**
     * 缺陷DTO
     */
    private DefectInfoDTO defectInfoDTO = new DefectInfoDTO();
    /**
     * 危重
     */
    private String critical;
    /**
     * 手术
     */
    private String surgery;
    /**
     * 输血
     */
    private String transfuse;
    /**
     * 出院（死亡）
     */
    private String leavehospitalway ;
    
    /**
     * 跟踪标记 0 未跟踪、1已跟踪
     */
    private String trackFlag;

    /**
     * 入科动作Id
     */
    private String actIdInDepartment;
    
    @Override
    public String toString()
    {
        return "PatientEncounterDTO [\n患者就诊号=" + encounterID + ",\n 住院号=" + hospitalizationNO + ",\n 就诊类型=" + encounterType + ",\n 就诊卡类型数据字典DTO="
                + medicalCardTypeDic + ",\n 就诊卡号=" + medicalCardId + ",\n 患者基本信息=" + patientBaseInfoDTO + ",\n 身份证证件类型数据字典DTO=" + cardTypeDic
                + ",\n 身份证号=" + cardId + ",\n 医保类型数据字典DTO=" + insuranceTypeDic + ",\n 医保号=" + insuranceId + ",\n 患者号表信息集合=" + listVisitInfo + ",\n 费别="
                + chargeTypeDic + ",\n 支付方式DTO=" + payWay + ",\n 入院基本信息=" + inHospitalDTO + ",\n 操作员信息记录=" + loginBaseInfo + ",\n 入科，接诊基本信息="
                + inDepartment + ",\n 门诊诊断=" + outpat_diagose + ",\n 出院信息=" + dischargedDTO + ",\n 病例信息=" + emrControllerDTO + ",\n 单位DTO="
                + organizationDTO + "]";
    }


    public PatientEncounterDTO()
    {
    }


    public PatientEncounterDTO(Long patientID, Long workGroupRoleId)
    {
        this.getPatientBaseInfoDTO().setPersonId(String.valueOf(patientID));
        this.getInHospitalDTO().setRoleID(String.valueOf(workGroupRoleId));
    }


    public PatientEncounterDTO(long patientID, String name, String cardId, String sex, String age, long workGroupRoleId, String deptName,
            String encounterNO, String encounterNum, long doctorId, long workGroupId)
    {

        this.getPatientBaseInfoDTO().setPersonId(String.valueOf(patientID));
        this.getPatientBaseInfoDTO().setNatureName(String.valueOf(name));
        this.getInHospitalDTO().setRoleID(String.valueOf(workGroupRoleId));
        this.getInHospitalDTO().setDeptName(deptName);
        this.getInHospitalDTO().setEncounterNum(encounterNum);
        this.getInHospitalDTO().setHospitalizationNO(encounterNO);
        this.getInDepartment().setDoctorId(String.valueOf(doctorId));
        this.getInDepartment().setWorkGroupId(String.valueOf(workGroupId));

    }


    public String getEncounterType()
    {
        return encounterType;
    }


    public void setEncounterType(String encounterType)
    {
        this.encounterType = encounterType;
    }


    public DictionaryDTO getMedicalCardTypeDic()
    {
        return medicalCardTypeDic;
    }


    public void setMedicalCardTypeDic(DictionaryDTO medicalCardTypeDic)
    {
        this.medicalCardTypeDic = medicalCardTypeDic;
    }


    public String getMedicalCardId()
    {
        return medicalCardId;
    }


    public void setMedicalCardId(String medicalCardId)
    {
        this.medicalCardId = medicalCardId;
    }


    public PatientBaseInfoDTO getPatientBaseInfoDTO()
    {
        return patientBaseInfoDTO;
    }


    public void setPatientBaseInfoDTO(PatientBaseInfoDTO patientBaseInfoDTO)
    {
        this.patientBaseInfoDTO = patientBaseInfoDTO;
    }


    public DictionaryDTO getCardTypeDic()
    {
        return cardTypeDic;
    }


    public void setCardTypeDic(DictionaryDTO cardTypeDic)
    {
        this.cardTypeDic = cardTypeDic;
    }


    public String getCardId()
    {
        return cardId;
    }


    public void setCardId(String cardId)
    {
        this.cardId = cardId;
    }


    public DictionaryDTO getInsuranceTypeDic()
    {
        return insuranceTypeDic;
    }


    public void setInsuranceTypeDic(DictionaryDTO insuranceTypeDic)
    {
        this.insuranceTypeDic = insuranceTypeDic;
    }


    public String getInsuranceId()
    {
        return insuranceId;
    }


    public void setInsuranceId(String insuranceId)
    {
        this.insuranceId = insuranceId;
    }


    public List<VisitsDTO> getListVisitInfo()
    {
        return listVisitInfo;
    }


    public void setListVisitInfo(List<VisitsDTO> listVisitInfo)
    {
        this.listVisitInfo = listVisitInfo;
    }


    public DictionaryDTO getChargeTypeDic()
    {
        return chargeTypeDic;
    }


    public void setChargeTypeDic(DictionaryDTO chargeTypeDic)
    {
        this.chargeTypeDic = chargeTypeDic;
    }


    public PayWayDTO getPayWay()
    {
        return payWay;
    }


    public void setPayWay(PayWayDTO payWay)
    {
        this.payWay = payWay;
    }


    public InHospitalDTO getInHospitalDTO()
    {
        return inHospitalDTO;
    }


    public void setInHospitalDTO(InHospitalDTO inHospitalDTO)
    {
        this.inHospitalDTO = inHospitalDTO;
    }


    public LoginBaseInfoDTO getLoginBaseInfo()
    {
        return loginBaseInfo;
    }


    public void setLoginBaseInfo(LoginBaseInfoDTO loginBaseInfo)
    {
        this.loginBaseInfo = loginBaseInfo;
    }


    public String getEncounterID()
    {
        return encounterID;
    }


    public void setEncounterID(String encounterID)
    {
        this.encounterID = encounterID;
    }


    public InDepartmentDTO getInDepartment()
    {
        return inDepartment;
    }


    public void setInDepartment(InDepartmentDTO inDepartment)
    {
        this.inDepartment = inDepartment;
    }


    public void setOutpat_diagose(DictionaryDTO outpat_diagose)
    {
        this.outpat_diagose = outpat_diagose;
    }


    public DictionaryDTO getOutpat_diagose()
    {
        return outpat_diagose;
    }


    public void setDischargedDTO(DischargedDTO dischargedDTO)
    {
        this.dischargedDTO = dischargedDTO;
    }


    public DischargedDTO getDischargedDTO()
    {
        return dischargedDTO;
    }


    public void setEmrControllerDTO(EmrManagerDTO emrControllerDTO)
    {
        this.emrControllerDTO = emrControllerDTO;
    }


    public EmrManagerDTO getEmrControllerDTO()
    {
        return emrControllerDTO;
    }


    public void setOrganizationDTO(OrganizationDTO organizationDTO)
    {
        this.organizationDTO = organizationDTO;
    }


    public OrganizationDTO getOrganizationDTO()
    {
        return organizationDTO;
    }


    public static long getSerialversionuid()
    {
        return serialVersionUID;
    }


    public TransferDTO getTransferDTO()
    {
        return transferDTO;
    }


    public void setTransferDTO(TransferDTO transferDTO)
    {
        this.transferDTO = transferDTO;
    }


    public void setHospitalizationNO(String hospitalizationNO)
    {
        this.hospitalizationNO = hospitalizationNO;
    }


    public String getHospitalizationNO()
    {
        return hospitalizationNO;
    }


    public DefectInfoDTO getDefectInfoDTO()
    {
        return defectInfoDTO;
    }


    public void setDefectInfoDTO(DefectInfoDTO defectInfoDTO)
    {
        this.defectInfoDTO = defectInfoDTO;
    }


    public String getCritical()
    {
        return critical;
    }


    public void setCritical(String critical)
    {
        this.critical = critical;
    }


    public String getSurgery()
    {
        return surgery;
    }


    public void setSurgery(String surgery)
    {
        this.surgery = surgery;
    }


    public String getTransfuse()
    {
        return transfuse;
    }


    public void setTransfuse(String transfuse)
    {
        this.transfuse = transfuse;
    }


    public String getLeavehospitalway()
    {
        return leavehospitalway;
    }


    public void setLeavehospitalway(String leavehospitalway)
    {
        this.leavehospitalway = leavehospitalway;
    }
    
    
    public String getTrackFlag()
    {
        return trackFlag;
    }

    public void setTrackFlag(String trackFlag)
    {
        this.trackFlag = trackFlag;
    }


    public String getActIdInDepartment()
    {
        return actIdInDepartment;
    }


    public void setActIdInDepartment(String actIdInDepartment)
    {
        this.actIdInDepartment = actIdInDepartment;
    }
}
